package br.com.getdiscount.tcc.model.origem;

import java.io.Serializable;
import java.util.List;

import javax.faces.bean.ManagedBean;

import br.com.getdiscount.base.bean.AbstractManegedBean;
import br.com.getdiscount.base.model.Entity;
import br.com.getdiscount.tcc.GdServiceLocator;

@SuppressWarnings("serial")
@ManagedBean(name="origemBean")
public class OrigemBean extends AbstractManegedBean<Origem> implements Serializable {

	@Override
	protected void initializeEntity() {
		setEntity( new Origem() );
	}

	
	public void printOrigem() {
		List<Entity> mercados =  getDefaultService().findAll(new Origem());
		for (Entity e: mercados) {
			Origem o = (Origem) e;
			System.out.println(o.getDsOrigem());
		}
	}
	
}
